from common.helper import Helper
from db.mysql import MysqlClient
class Arrangement( object ):

    def __init__(self):
        self.mysql = MysqlClient()
        self.name = "幼儿医疗健康保险（传染病）"

        # 拉取数据
    def pullData(self, data={}):
        for item in Helper.selectData(self.name, self.mysql):
            data["name"] = self.name
            data["company"] = "平安保险"
            data["year"] = item["year"]
            data["socialSec"] = item["socialSec"]
            data["contagionMedical"] = str(int(int(item["contagionMedical"])/10000)) + "w"
            data["specialContagion"] = str(int(int(item["specialContagion"])/10000)) + "w"
            data["accidentOutpatient"] = str(int(int(item["accidentOutpatient"])/10000)) + "w"
            data["accidentAllowance"] = str(int(int(item["accidentAllowance"])/10000)) + "w"
            data["foodPoison"] = str(int(int(item["foodPoison"])/10000)) + "w"
            data["accidentDeath"] = str(int(int(item["accidentDeath"])/10000)) + "w"
            data["price"] = item["price"]
            data["expire"] = "1年"
            data["payType"] = "年交"
            Helper.mergeTable( self.name,self.mysql,data )
if __name__ == '__main__':
    a = Arrangement()
    a.pullData()